home *** CD-ROM | disk | FTP | other *** search
- {*************************************************************************
- *
- * TwwDBISAMTable source for Infopower Support
- *
- * Version 1.0 Last Modified 4/6/98
- *
- * Modified by Elevate Software for DBISAM Database System
- * Copyrighted source provided by Woll2Woll Software
- *
- *************************************************************************}
-
- unit DBISAMIp;
-
- interface
-
- uses SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
- Forms, DB, dialogs, wwfilter, wwStr, wwSystem, wwTable, wwtypes,
- DBISAMTb;
-
- type
-
- TwwDBISAMTable = class(TDBISAMTable)
- Private
- FControlType : TStrings;
- FPictureMasks : TStrings;
- FUsePictureMask : boolean;
- FOnInvalidValue : TwwInvalidValueEvent;
-
- Function GetControlType : TStrings;
- Procedure SetControlType( sel : TStrings );
- Function GetPictureMasks : TStrings;
- Procedure SetPictureMasks( sel : TStrings );
-
- Protected
- Procedure DoBeforePost; Override; { For picture support }
-
- Public
- Constructor Create( AOwner : TComponent ); Override;
- Destructor Destroy; Override;
-
- Published
- Property ControlType : TStrings
- Read GetControlType
- Write setControltype;
- Property PictureMasks: TStrings
- Read GetPictureMasks
- Write SetPictureMasks;
- Property ValidateWithMask : boolean
- Read FUsePictureMask
- Write FUsePictureMask;
- Property OnInvalidValue: TwwInvalidValueEvent
- Read FOnInvalidValue
- Write FOnInvalidValue;
- Property IndexDefs;
- end;
-
- Procedure Register;
-
- implementation
- uses
- wwcommon,
- dbconsts;
-
-
- Constructor TwwDBISAMTable.create( AOwner : TComponent );
- begin
- inherited Create( AOwner );
- FControlType := TStringList.create;
- FPictureMasks := TStringList.create;
- FUsePictureMask := True;
- end;
-
-
- Destructor TwwDBISAMTable.Destroy;
- begin
- FControlType.Free;
- FPictureMasks.Free;
- FPictureMasks:= NIL;
- Inherited Destroy;
- end;
-
-
- Function TwwDBISAMTable.GetControltype : TStrings;
- begin
- Result := FControlType;
- end;
-
-
- Procedure TwwDBISAMTable.SetControlType( sel : TStrings );
- begin
- FControlType.Assign( sel );
- end;
-
-
- Function TwwDBISAMTable.GetPictureMasks : TStrings;
- begin
- Result:= FPictureMasks
- end;
-
-
- Procedure TwwDBISAMTable.SetPictureMasks( sel : TStrings );
- begin
- FPictureMasks.Assign( sel );
- end;
-
- Procedure TwwDBISAMTable.DoBeforePost;
- begin
- Inherited DoBeforePost;
- if FUsePictureMask then
- wwValidatePictureFields( self, FOnInvalidValue );
- end;
-
-
- Procedure Register;
- begin
- RegisterComponents('InfoPower', [TwwDBISAMTable] );
- end;
-
-
- end.
-